<div id="keyword_helper">



</div>

<script type="text/javascript"> 

var ADGROUP_ID = {$adgroup_id};
var CATEGORY_ID = {$category_id};
;(function($) {
/*   var selector = new $.ikeywordHelper("#keyword_helper" , {} ,
	        {
	            open : true,
	            params : {
  					//campaign_id : CAMPAIGN_ID , 
  					//product_id : PRODUCT_ID, 
  					adgroup_id : ADGROUP_ID,
  					category_id : CATEGORY_ID,
  	                from : Date.today().add({ days: -7 }).toString('yyyy-MM-dd'),
  	                to : Date.today().toString('yyyy-MM-dd')
	            }
	        });*/
	var  box_container = $("#keyword_helper");
		selector = $.keywordSelector(box_container,{
		open : true,
		params : {
			//campaign_id : CAMPAIGN_ID ,
			//product_id : PRODUCT_ID,
			adgroup_id : ADGROUP_ID,
			category_id : CATEGORY_ID,
			from : Date.today().add({ days: -7 }).toString('yyyy-MM-dd'),
			to : Date.today().toString('yyyy-MM-dd')
		}
	} );
   
   var helper_appbar = new appBar();
	helper_appbar.addBtn( {
		id : "multiInsertKeywords",
		icon : 'save.png',
		name : '保存关键词',
		onclick : selector.submitKeywords
	} );
	
	helper_appbar.addLine();
	
	helper_appbar.addBtn( {
		id : "multiInsertKeywords",
		icon : 'add.png',
		name : '批量添加关键词',
		onclick : selector.multiInsertKeywords
	} );
	
	
   selector.addEvent('onRowselect' , function(num){
	   if(num > 0){
		   helper_appbar.show();
	   }else{
		   helper_appbar.hide(); 
	   }
   });
   
   selector.init();
   
})(jQuery);
</script>       
